package com.taoyibao.hongcanting.ui.entertainment.fragment;

import android.view.View;

import com.taoyibao.hongcanting.R;
import com.taoyibao.hongcanting.base.fragment.BaseFragmentPresenter;
import com.taoyibao.hongcanting.cache.SpUtils;
import com.taoyibao.hongcanting.ui.entertainment.activity.LeaderboardActivity;
import com.taoyibao.hongcanting.ui.entertainment.delegate.EntertainmentDelegate;
import com.taoyibao.hongcanting.ui.login.activity.LoginActivity;

/**
 * @author TangAnna
 * @description: 娱乐
 * @date :${DATA} 11:28
 */
public class EntertainmentFragment extends BaseFragmentPresenter<EntertainmentDelegate> implements View.OnClickListener {
    @Override
    protected Class<EntertainmentDelegate> getDelegateClass() {
        return EntertainmentDelegate.class;
    }

    @Override
    protected void bindEvenListener() {
        super.bindEvenListener();
        viewDelegate.get(R.id.iv_yule).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (SpUtils.getLoginStatus()) {
            switch (v.getId()) {
                case R.id.iv_yule://排行榜
                    LeaderboardActivity.open(getContext());
                    break;
            }
        } else {
            LoginActivity.open(getContext(), "");
        }

    }
}
